import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:life_service/color/hex.dart';
import 'package:life_service/utils/styles.dart';

import '../controller.dart';

class MineWalletCompletePage extends GetView<MineWalletCompleteController> {
  const MineWalletCompletePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: PreferredSize(
        preferredSize: Size.fromHeight(Get.mediaQuery.padding.top + 44),
        child: AnnotatedRegion<SystemUiOverlayStyle>(
          value: SystemUiOverlayStyle.dark,
          child: Container(
            padding: Get.mediaQuery.padding,
            alignment: Alignment.centerLeft,
            decoration: BoxDecoration(
              color: Colors.white,
              border: Border(
                bottom: BorderSide(
                  color: HexColor(HexColor.colorF2f2),
                ),
              ),
            ),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                TextButton(
                  onPressed: Get.back,
                  child: Text.rich(
                    TextSpan(
                      children: [
                        const WidgetSpan(
                          child: Icon(
                            CupertinoIcons.chevron_back,
                            size: 18,
                            color: Colors.black,
                          ),
                        ),
                        TextSpan(
                          text: ' 充值结果',
                          style: StylesUtils.customTextStyle(
                            fontSize: StylesUtils.fontSize16,
                            color: HexColor.color3333,
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
                TextButton(
                  onPressed: Get.back,
                  child: Text(
                    '完成',
                    style: StylesUtils.customTextStyle(
                      fontSize: StylesUtils.fontSize16,
                      color: HexColor.colorFf62,
                    ),
                  ),
                )
              ],
            ),
          ),
        ),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              padding: const EdgeInsets.only(top: 40, bottom: 15),
              alignment: Alignment.center,
              child: Icon(
                CupertinoIcons.checkmark_alt_circle_fill,
                size: 60,
                color: HexColor(HexColor.colorFf62),
              ),
            ),
            Center(
              child: Text(
                '充值成功',
                style: StylesUtils.customTextStyle(
                  color: HexColor.color3333,
                ),
              ),
            ),
            Container(
              padding: const EdgeInsets.only(top: 20, bottom: 30),
              alignment: Alignment.center,
              child: Text(
                '￥140.00',
                style: StylesUtils.customTextStyle(
                  fontWeight: FontWeight.w700,
                  fontSize: StylesUtils.fontSize28,
                  color: HexColor.color3333,
                ),
              ),
            ),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 15),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text(
                    '充值方式',
                    style: StylesUtils.customTextStyle(
                      color: HexColor.colorCccc,
                    ),
                  ),
                  Text(
                    '工商银行储蓄卡（3076）',
                    style: StylesUtils.customTextStyle(
                      color: HexColor.color3333,
                    ),
                  )
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
